<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<c:url value="/css/style.css" />" rel="stylesheet" type="text/css" media="screen" />
<title>會員首頁</title>
<style type="text/css">
.blue {  
    color: #d9eef7;  
    border: solid 1px #0076a3;  
    background: #0095cd;  
    background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));  
    background: -moz-linear-gradient(top,  #00adee,  #0078a5);  
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');  
}  
.blue:hover {  
    background: #007ead;  
    background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));  
    background: -moz-linear-gradient(top,  #0095cc,  #00678e);  
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc', endColorstr='#00678e');  
}  
.blue:active {  
    color: #80bed6;  
    background: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee));  
    background: -moz-linear-gradient(top,  #0078a5,  #00adee);  
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00adee');  
}
#page1{
 	width:950px;
 	background:#ECFFFF;
 	border-radius:45px;
 	-moz-border-radius:45px;
 	-webkit-border-radius:45px;
 	margin: 0 auto;
	padding: 0;
	border-width:rough;
	border-style:dashed;
	border-color:#66B3FF;
	
 	}
 	
#left{
	float: left;
	width: 200px;
}

#right{
	float: left;
	width: 500px;
	padding: 0 0 0 50px;
}

.content_box{
	width:185px;
	height:200px;
	display: inline-block;
	font-size:12px;
	border: 3px dashed #02F78E;
	padding: 10px;
	margin: 5px 5px 5px 0;
	overflow:hidden;
	font-size:16px;
	line-height: 1.5em;
	letter-spacing: 1pt;
	-webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;	
}

#options_td{
	width:90px;
	height:30px;
	text-align: center;
	vertical-align: middle;
	font-weight: 600;
	background:#ffc1e0;
	-webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
		
}

</style>

<script src="<c:url value="/js/jquery-1.9.1.min.js" />"></script>
<script type="text/javascript">
$(function(){
	$('input[name=deldel]').click(function(e){
		var answer = confirm("確定要刪除食譜?");
		
		if (!answer){
			e.preventDefault();
		}
    });
	
})

</script>


</head>
<body>
<!-- 引入共同的頁首 -->
<c:set var="funcName" value="IND" scope="session"/>
<jsp:include page="/top/top.jsp" />

<!-- 從這裡開始寫 -->
<div id="page1">
		
	<div id="left" align=center>
	<table>
	<br><br><br><br><br>
	<tr><td>
	<%-- <img src="<c:url value="/images/pee.jpg" />" > --%>
	<img height='120' width='120' border="1px"  src='${pageContext.servletContext.contextPath}/getImg?id=${user.mbid}&type=MEMBER' >
	</td></tr>
	<tr><TD><b><font size="5px" color="#01814a">${user.mbname}的空間</font></b></TD></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MyRecipe" />" ><font size="3px" color="#0072e3">我分享的食譜</font></a>
	</td></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MyCollect" />" ><font size="3px" color="#0072e3">我收藏的食譜</font></a>
	</td></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MyOrder" />" ><font size="3px" color="#0072e3">我訂閱的作者</font></a>
	</td></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MyProduct" />" ><font size="3px" color="#0072e3">我收藏的影片</font></a>
	</td></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MyCourse" />" ><font size="3px" color="#0072e3">我參加的課程</font></a>
	</td></tr>
	<tr><td id="options_td">
	<a href="<c:url value="/member/MemberInfo" />" ><font size="3px" color="#0072e3">編輯個人資料</font></a>
	</td></tr>
	
	</table>
	</div>

	<div id="right" align=center>
		<br>
		<b><font style="font-size:1cm;color: #005ab5 ;text-shadow: 1px 0 0 #004b97">我分享的食譜</font></b>
		<br>
		<table style="width:700px">
		<% int i=0; %>
		<br>
		<tr>
		<c:forEach varStatus="stVar"  var="rbean"  items="${mbRecipe}" >     
               	<td class="content_box" ><center>
               	<a href="<c:url value='/recipe/ShowRecipe?rid=${rbean.rid}' />">
               	<img height='100' width='100' src='${pageContext.servletContext.contextPath}/getImg?id=${rbean.rid}&type=RECIPE'>
               	<br/>${rbean.rname}</a>
               	<br/>
               	<b><font style=font-size:0.3cm>分享日期:${rbean.rdate}</font></b>
               	<br/>
               	<form action="${pageContext.servletContext.contextPath}/DeleteServlet">
               	<input type="hidden" name="type" value="RECIPE">
               	<input type="hidden" name="rid" value="${rbean.rid}">
               	<input type="submit" class="button blue" name="deldel" value="刪除食譜">
               	</form>
               	</center>
               	</td>
               	 <% i++; 
                 if(i%3==0){
                	 out.print("</tr><tr>");
                	 
                 }
                 %>	     
		</c:forEach>
		  </tr>
		</table>
	</div>
	<div style="clear: both;">&nbsp;</div>


</div>

<!-- 寫到這裡結束 -->

<div id="footer-wrapper">
	<div id="footer">
		<p>Copyright (c) 2010 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/" rel="nofollow">FCT</a>.</p>
	</div>
</div>
</body>
</html>